var PlayLayer = cc.Layer.extend({
	backgroundLayer : null,
	mainLayar : null,
	tip_layer:null,
	flow:null,
	ctor:function () {
		this._super();
		this.initFrames();
		this.backgroundLayer = new PlayBackgroundLayer(this);
		this.flow = new TeachFlow03(this);
		gg.flow = this.flow;
		this.mainLayer = new PlayMainLayer(this,TAG_MAIN);
		ll.tip_layer = new TipLayer03(this);
		
		this.flow.init(ll.tip_layer.tip,ll.tip_layer.tip_frame, ll.tip_layer.flash);
		this.flow.start();
		this.flow.next();
	},
	initFrames : function(){
		cc.spriteFrameCache.addSpriteFrames(res_play03.run_p);
	},
	over:function (){
		ll.tip_layer.over();
		ch.gotoFinish(TAG_EXP_03, g_resources_finish03, new FinishScene03());
//		$.runScene(new FinishScene03());
	}
});
var PlayScene = PScene.extend({
	onEnter:function () {
		this._super();
		this.initTeach();
		var layer = new PlayLayer();
		this.addChild(layer);
	},
	initTeach:function(){
		gg.fontName = "cocos2d";
		gg.fontColor=cc.Color(0,0,0,0);
		gg.expId = 3;
		gg.lastStep = 1;
		gg.userId = 1;
		gg.expVer = 3;
		gg.version = '';
		// 初始化游戏参数
		gg.begin_time = new Date();
		gg.score = 0;
		gg.errorStep = 0;// 错误步数
		gg.oneSure = 0;// 一次正确的步数
		gg.errFlag = false;
		gg.teachFlow = teachFlow03;
		gg.totalStep = gg.teachFlow.length;
	}
});
